1 Operating System Part 1
1 Operating System Part 1
1 Operating System Part 1
net/publication/283778784
CITATIONS READS
0 326,031
1 author:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Computer Vision and Image Analysis, Understanding and Processing View project
All content following this page was uploaded by Qasim Mohammed Hussein on 14 November 2015.
Computer System
A computer system can be divided into four components: the
hardware, the operating system, the application programs and the
users. The abstract view of system components is shown in figure 1.
1. Hardware: such as CPU, memory and I/O devices.
2. Operating system: provides the means of proper use of the hardware in the
operations of the computer system, it is similar to government.
3. Application programs: solve the computing problems of the user, such as :
compilers, database systems and web browsers.
4. Users: peoples, machine, or other computer.
1. Computer-System Operation
A modern general-purpose computer system consists of one or more CPUs and a
number of device controllers connected through a common bus that provides
access to shared memory (Figure 1.2). Each device controller is in charge of a
specific type of device (for example, disk drives, audio devices, and video
displays). The CPU and the device controllers can execute concurrently,
competing for memory cycles. To ensure orderly access to the shared memory, a
memory controller is synchronizing access to the memory.
For a computer to start running-for instance, when it is powered up or rebooted-
it needs to have an initial program to run. This initial program, or bootstrap
program, tends to be simple. Typically, it is stored in read-only memory (ROM)
or electrically erasable programmable read-only memory (EEPROM),known by
the general term firmware, within the computer hardware. It initializes all
aspects of the system, from CPU registers to device controllers to memory
contents. The bootstrap program must know how to load the operating system
Figure 2
2. Storage Structure
Computer programs must be in main memory (also called RAM) to be executed.
Main memory is the only large storage area that the processor can access
directly. It forms an array of memory words. Each word has its own address.
Interaction is achieved through a sequence of load or store instructions to
specific memory addresses. The load instruction moves a word from main
memory to an internal register within the CPU, whereas the store instruction
moves the content of a register to main memory.
The instruction-execution cycle includes:
1) Fetches an instruction from memory and stores that instruction in the
instruction register. And increment the PC register.
2) Decode the instruction and may cause operands to be fetched from memory
and stored in some internal register.
3) Execute the instruction and store the result in memory.
3. I/O Structure
3. I/O Structure
A computer system consists of CPUs and multiple device controllers that are
connected through a common bus. The device controller is responsible for
moving the data between the peripheral devices that it controls and its local
The main categories of modern OS may be classified into three groups which
are distinguished by the nature of interaction that takes place between the
computer and the user:
1. Batch system
In this type of OS, users submit jobs on regular schedule (e.g. daily, weekly,
monthly) to a central place where the user of such system did not interact
directly with computer system. To speed up the processing, jobs with similar
needs were batched together and were run through the computer as a group.
Thus, the programmer would leave the programs with the operator. The output
from each job would send to the appropriate programmer. The major task of this
type was to transfer control automatically from one job to the next.
Disadvantages of Batch System
1. Turnaround time can be large from user standpoint.
2. Difficult to debug program.
2. Time-Sharing System
This type of OS provides on-line communication between the user and the
system, the user gives his instructions directly and receives intermediate
response, and therefore it called interactive system.
The time sharing system allows many user simultaneously share the
computer system. The CPU is multiplexed rapidly among several programs,
which are kept in memory and on disk. A program swapped in and out of
memory to the disk.
Time sharing system reduces the CPU ideal time. The disadvantage is more
complex.
Performance development of OS
1. On-line and off-line operation
A special subroutine was written for each I/O device called a device
controller. Some I/O devices has been equipped for either on-line
operation (they are connected to the processor), or off-line operations
(they are run by control unit).
2. Buffering
A buffer is an area of primary storage for holding data during I/O transfer.
On input, the data are placed in the buffer by an I/O channel, when the
transfer is complete the data may be accessed the processor. The buffing
may be single or double.
Spooling uses the disk as a very large buffer. Spooling is useful because
device access data that different rates. The buffer provides a waiting
station where data can rest while the slower device catches up.
Spooling allows overlapping between the computation of one job and I/O
of another job.
Advantages
Disadvantages
5. Parallel system
There are more than on processor in the system. These processors share
the computer bus, clock, memory and I/O devices.
c) Reliability – If one processor failed the rest still can function with no
problem.
7. Personal computer
1. Process Management
Memory Management
Management
Main memory is a large array of words or bytes where each word or byte has its
own address. The operating system is responsible for the following activities in
regard to memory management:
1) Keeping track of which parts of memory are currently being used and by
whom
2) Deciding which processes (or parts thereof) and data to move into and out of
memory
1. Free-space management.
2. Storage allocation
3. Disk scheduling.
Example about how system calls are used from the OS to read data from one
files and copy them to another file, shown in figure . the programmer never see
this level of details
System program provide basic function to users, so that they don’t need to write
their own environment for program development (editors, compilers) and
program execution (shells).
Module Questions
There are many questionS the files:
1. Operating System: Questions and their answers: Processes and Deadlock
(Part 1)
2. Operating system questions with their answers (Memory management,
Virtual memory, Processes synchronization) Part two.
The link:
https://www.researchgate.net/profile/Qasim_Hussein/contributions