OS: make the system more efficient;
Resource manager
Controls the interaction between processes and between user and process.
OS: doesn’t directly execute a process, it controls the execution of a process.
Batch processing: 50
Mainframe computers
Punched cards
Batch of cards cards will be fed into a card reader
Program – file with instructions;
Process – is a program in execution
P100 P200 P300
Job queue; FirstComeFirstServed scheduling algorithm FCFS
Add some control instructions: let the CPU know when a process terminates and when another starts.
Big speed difference between the CPU and I/O devices.
Terminology: jobs
Batch file: executable file that contains instructions to me executed by the OS. – no interaction between user and process.
.passwd .login
Poor utilization of resources: ONLY ONE RESOURCE is used at a given time.
Executes: uses the CPU – arithmetic and logical operations
CPU burst – process directly uses the CPU
I/O burst – I/O operations and others
Alternations between CPU burst and I/O burst
Multiprogramming (centralized env. – 1 CPU and 1 memory component)
Ready for execution: processes are in the main memory; processes will be in the ready queue.
Ready: all that the process needs is the control over the CPU.
Resources queues for these resources handled by processes of the OS (schedulers)
Concurrent execution
Multiprocessing env: more than 1 CPU;
CPUs are sharing the bus, the memory and system clock.
If more than 2 CPUs – the bus becomes congested.
Symmetric env: CPUs are equal, like peers; equal access to all resources
Asymmetric env: master – slave relation between CPUs.
We might have only one CPU (master) that has access to the I/O devices and can communicate with the user.
Master controls the other CPUs (slaves); OS run on the master CPU.
Timesharing
Special multiprogramming env. (only 1 CPU and many processes ready for execution)
Multiple terminals multiple users
OS wants to make the user believe that the CPU its dedicated to himself.
Basic multiprogramming: our computer
Timesharing env: highly interactive – mars
Default scheduling algorithm in a timesharing env:
Round robin: FCFS with a quantum
CPU
Tty 1 tty2 tt3
User1 user2 user3 ….
Ready ready: p100, p200, p300, p400, p600
————————————————————-
Multiprogramming, Multiprocessing, Timesharing
Threads, virtual memory,
Real time environment:
Soft real time
Hard real time
Time constraints for ALL processes in the system
Virtual memory: allows the process to have part of the address space in the secondary memory more processes ready for execution
-) if a process reference something that is not yet in the main memory, that data must be first be brought from secondary mem to main memory.
Main memory access nsec nano seconds
Transfer from sec memory to main memory : msec millisec