CH 1
CH 1
CH 1
Chapter 1
Introduction
Introduction
• Without software, computer is basically useless compact
mass of metal
• With software, computer can store, process and retrieve
information; play music and video; send emails ….etc
• 2 types of software
• Application programs: perform the actual work the user wants
• OS: control all the computer’s resources provide a base upon which the
application programs can be written
The Modern Computer System
• Timesharing
• Local Area Network (LAN)
Fourth generation
• Use of microprocessor price and performance
• OS
• DOS (IBM)
• MSDOS
• Apple DOS
• MacDOS
• UNIX
• List of memory location (from 0 to some max) which the process can read
and write
• Set of registers: program counter PC, stack pointer and other hardware
registers
Process management system
• In timesharing
• At the end of the quantum Stop process and run another
• Stopped process must restart exactly at the same state when it was stopped
save all information about the process in process table (linked list)
• Core image = @ space of suspended process
• Using
• Shell or command interpreter
• Double click on icon in GUI
Process management system
• Process can create 1 or more child processes
• Child process can create child processes
process tree
Figure 1-5. A process tree. Process A created two child processes, B and C.
Process B created three child processes, D, E, and F.
File Management system
• File management system system calls (Create, remove,
Read, Write, Open and close a file)
• 2 path’s type
• Absolute path: from root
• 3 bits for user, 3 bits for group and 3 bits for everyone else
• Example rwxr-x--x
File Management system
• When file is opened, check the permission
• Yes: system return integer (file description)
• Character: used to model devices that accept or output a character ( example printer)
File Systems (2)
Figure 1-7. (a) Before mounting, the files on drive 0 are not accessible. (b)
After mounting, they are part of the file hierarchy.
Mounting process is before your computer can use any kind of storage device (such
as a hard drive, CD-ROM, or network share)
you or your operating system must make it accessible through the computer's file
system. You can access only files on mounted media
File Management system
• Pipe is a pseudofile used to connect 2 processes
• OS carries out the system call and return control the instruction
following the system call
System calls
Figure 1-11. Processes have three segments: text, data, and stack. In
this example, all three are in one address space, but separate
instruction and data space is also supported.
System Calls (2)
Signals is a mechanism to convey information to process that is
not necessary waiting for input
Figure 1-12. The structure used to return information for the stat
and fstat system calls. In the actual code, symbolic names
are used for some of the types.
System Calls for File Management
link(“/usr/jim/memo”,”/usr/ast/note”);
mount(“/dev/cdrom0”,”/mnt”,0);
Time Management
• Monolithic Systems
• Layered System
• Virtual System
• Exokernels
• Client-Server System
Monolithic Systems
• There is a little structure.
• 2 type of mode
– User mode: for user, in which I/O and certain other instructions are not
allowed
Monolithic System
•The kernel is
• The central component of most computer operating systems;
• A bridge between applications and the actual data processing
done at the hardware level
Monolithic System
• example VM1 get disk block from 0 to 1023 and VM2 get
blocks from 1024 to 2047 and so on
• No system calls.