Assignment 1 Solution
- What components make up the operating system kernel? [5]
- booting and initialisation routines
- device drivers
- interrupt handlers
- file, memory, process and network managers (in
monolithic kernels)
- message passing (in microkernel systems)
- Rank the following in terms of speed, fastest to slowest: I/O devices,
processor, main memory, registers, secondary storage, users. [3]
- processor, registers, main memory, secondary
storage, I/O devices, users
- What names are given to operating systems that have the following? [5]
- multi-user or time-sharing: more than one user
- batch processing: more than one job submitted at a time
- multiprogramming: more than one program in memory at a time
- multitasking: more than one process sharing the processor
- multiprocessing: more than one processor
- What is the difference between a system call and an interrupt? [4]
- a hardware interrupt is generated by
hardware such as a disk or I/O peripheral
- a system call is a "software
interrupt" generated by application software to control hardware
- List three reasons a system administrator would need to create a file
using a command language.
What are two names for these files? [5]
- user account creation and configuration,
software installation, system monitoring and logging, file cleanup,
backup, etc.
- batch files or shell scripts
- What type of user interface is used to control the computer by typing a
line of text at a prompt?
What do DOS and UNIX use to make sense of what the user typed? [3]
- command-line or command-based user interface
- Both use a search path to look for the
program to execute the command
- DOS uses internal commands via
command.com and external commands in a directory like
c:\windows\command
- UNIX uses a shell program
- What are the purposes of command switches? [2]
- provide command options such as names of files
to be used in processing
- What is a search path? [2]
- a list of folders that the command-line
interface searches for a program to execute a command typed by the user
- How could you use UNIX system calls to start a new program? [2]
- You could use fork() and/or exec(), depending on
whether you wanted to end the current program and/or start an
independently running program
- What factors are considered when scheduling a job using job control
language? [5]
- the priority/importance of the job
- how much CPU time, I/O time, memory and other
resources the job will take or has taken in the past
- the time when the job was scheduled and any
deadline(s) for when it must/should be completed
- Briefly explain the use of the process stack. [2]
- The stack is used to store subroutine arguments
and return addresses.
- When a subroutine is called, the arguments and
return address is stored at the top of the stack.
- When returning from the subroutine, the return
address is removed from the top of the stack and read.
- Give two similarities and two differences between a process and a
thread.[4]
- Processes and threads both have program counters
and stacks to keep track of instructions and variables.
- Threads are smaller and more efficient because
they share process resources such as the program text.
- What properties of processes determine which process should use the CPU
next? [5]
- whether the process is owned by a user or the
operating system
- the priority assigned by a user, administrator
or the operating system
- whether the process is batch, interactive or
real time
- resources (CPU time, I/O time, memory) the
process has already used or is likely to use (e.g. based on previous use
of a program)
- whether the process is I/O or CPU bound
- how long the process has been waiting to use the
CPU
- List three types of code files which can be present in memory on a
computer running Windows. [3]
- Executable file (.exe, .com) or batch file
(.bat) (system program or user application)
- Library file (.dll)
- Device drivers (.sys, .drv)