- 2BSD
- .
- .
- .
- 2.9BSD
- 2.10BSD
- 2.11BSD
- 3BSD
- 4BSD
- 4.2BSD
- 4.3BSD
- 4.4BSD
Flexibility - Traditional Kernel: file, scheduling, executable file formats
Modern UNIX Kernel Assessment of UNIX - Advantages: - open software process, - well designed, small and simple kernel, - text files in system databases, - simple, uniform interface to I/O devices, - portability (written in C)
Assessment of UNIX - Disadvantages: - expansion of the more and more complex I/O library, - unfriendly user interface, - building block approach to tools, but not to the kernel, - too many versions and standards, - monolithic, unmodular and more and more complex kernel.
UNIX Architecture - Hardware is surrounded by the operating-system
- Operating system is called the kernel
- Comes with a number of user services and interfaces
UNIX Architecture The layers of a UNIX system. - The layers of a UNIX system.
UNIX Utility Programs - A few of the more common UNIX utility programs required by POSIX
UNIX shell programming - cp src dest
- head –20 file
- ls *.c
- sort out
- sort temp;head –30
- sort
- grep ter *.t | sort | head –20 | tail –5 >foo
- sort
Process - In UNIX
- Process is an instance of a running program.
- Lifetime: fork/vfork->exec->exit
- Well-defined hierarchy: parent,child,init,
- init process: the top process
- swapper & pagedeamon
- Orphans: the parent process is terminated.
- Submission of a batch job
- User logs on
- Created to provide a service such as printing
- Spawned by an existing process
Process Termination - Batch job issues Halt instruction
- User logs off
- Process executes a service request to terminate
- Error and fault conditions
- Normal completion
- Time limit exceeded
- Memory unavailable
- Bounds violation
- Protection error
- example write to read-only file
- Arithmetic error
- Time overrun
- process waited longer than a specified maximum for an event
Reasons for Process Termination - I/O failure
- Invalid instruction
- happens when try to execute data
- Privileged instruction
- Data misuse
- Operating system intervention
- such as when deadlock occurs
- Parent terminates so child processes terminate
- Parent request
Process States - The Running state
- The process that gets executed (single CPU)
- The Ready state
- any process that is ready to be executed
- The Blocked state
- when a process cannot execute until some event occurs (ex: the completion of an I/O)
Process States - The New state
- OS has performed the necessary actions to create the process
- but has not yet committed to execute the process (not yet admitted)
- because resources are limited
- The Exit state
- Termination moves the process to this state
- It is no longer eligible for execution
- Tables and other info are temporarily preserved for auxiliary program
Five-State Process Model Single Blocked Queue Multiple Blocked Queues - Processor is faster than I/O so all processes could be waiting for I/O
- Swap these processes to disk to free up more memory
- Blocked state becomes suspend state when swapped to disk
- Two new states
- Blocked, suspend
- Ready, suspend
Process State Transition Diagram with Two Suspend States Processor State Information - Contents of processor registers
- User-visible registers
- Control and status registers
- Stack pointers
- Program status word (PSW)
Process Control Information - Additional information needed by the operating system to control and coordinate the various active processes
- scheduling and state information
- data structuring
- interprocess communication
- process privileges
- memory management
- resource ownership and utilization
Process Creation - Assign a unique process identifier
- Allocate space for the process
- Initialize process control block
- Set up appropriate linkages
- Ex: add new process to linked list used for scheduling queue
- Other
- maintain an accounting file
Do'stlaringiz bilan baham: |