Operating system organization (week 2) Flashcards

1
Q

what does an operating system provide

A

provides an environment for the safe and secure execution of application programs while doing it in an efficient and fast manner.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

operating systems are organized along 2 different lines which are ?

A

–> those that provide convenience for the user/program
–> those that ensure efficient operations of the system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what are the 6 services that provide convenience for user/program

A

–> user interface (Batch interface, CLI, GUI)
–> program execution (load, run & terminate the program)
–> Input/Output operation (file, cd/DVD, smartcard)
–> File system manipulation (create, read, write files and permission management)
–> Communications (Local/remote inter-process communication)
–> Error detection (able to detect error and take proper action)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what are the 3 services that provide

A

–> Resource allocation
–> Accounting
–> Protection and security

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is resource allocation

A

–> Resources to be allocated among multiple users fairly
–> Different algorithms are used to properly allocate different resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is accounting

A

–> Keep track of usage statistics eg CPU, Printer, Harddisk quota
–> Reconfigure system to improve computing services

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is protection and security

A

–> security of the system from outsiders
–> ensures that access to all system resources is controlled
–> audit trail must also exist so that people can find out what happened

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what are the 4 core functions of the OS

A

–> device management
–> process, thread, and resource management
–> memory management
–> file management

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Based on the four functions (device management, process, thread and resource management, memory management, and memory management ), the modern OS
implements________, which provides
__________ to the respective resource that they
manage.

A

4 major managers

abstractions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

there is ___________ interaction between the 4 major managemers

A

close

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is device management?

A

–> it refers to the way the generic devices are handled
–> special management approaches for processor and memory
–> partitioning design simplifies adding and upgrading devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what is process, thread and resource management

A

–> creates abstractions of processes, threads, and resources.
–> allocates processor resources equitably
–> allocates and tracks abstract resources such as queues, semaphores, and messages.
–> cooperates with the memory manager to administer the primary memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is memory management

A

–> administer and allocate primary memory
–> enforces resource isolation
–> enables sharing between processes
–> provides virtual memory extensions (abstract machine’s memory appears larger than physical memory)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is memory management?

A

–> administer and allocate primary memory
–> enforces resource isolation
–> enables sharing between processes
–> provides virtual memory extensions (abstract machine’s memory appears larger than physical memory)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is file management

A

–> creates abstractions of storage devices
–> range from byte stream files to indexed records
–> file system should also allow users to access local and remote files over the internet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

how does OS manage resource sharing

A

–> time/space multiplex sharing (use this where appropriate)

–> Exclusive use of a resource (Allow processes to use a resource exclusively as required.)

–> Isolation (Allow a resource to save information without fear of it being modified or tampered with.)

–> managed sharing (sharing must be done in an orderly fashion according to the properties of the resource)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

what are the 3 mechanisms to address isolation and sharing

A

–> processor modes
–> kernels
–> method of invoking system service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

what are processor modes

A

–> processor modes help to distinguish between trusted and untrusted software
–> Determine execution capability and accessible
memory areas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

what are 2 modes that modern processors provide

A

supervisor mode
user mode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what is supervisor mode (for OS)

A

–> it can execute all machine instructions
–> can reference all memory locations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

what is user mode (for user programs)

A

–> can execute a subset of instructions
–> Can only reference a subset of memory locations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

The processor in supervisor mode can execute all
instructions including __________ instructions

A

privileged

23
Q

privileged instructions are also called ?

A

supervisor/protected instructions

24
Q

Examples of privileged instructions are ?

A

–> I/O instructions
–> Memory-related instructions
–> Processor mode-change instructions

25
Q

Processor in user mode can execute only __________ instructions.

A

nonprivileged

26
Q

Processor in supervisor mode can access ______ and _______
memory locations

A

system and user space

27
Q

what is system space

A

refers to the memory area used by the
OS

28
Q

what is user space

A

refers to the memory area used by
application processes

29
Q

processor in user mode can only access ______

A

user space

30
Q

trusted os software executes in the ______

A

supervisor mode

31
Q

All other software (including some parts of the
OS) executes in __________

A

user mode

32
Q

what is concept

A

allows for OS to be able to control
access to resources

33
Q

how does concept work

A

–> User programs have to ask the OS to execute
privileged instructions on their behalf.

–> Any particular configuration can isolate or
permit sharing or resources according to the
administrator’s policy

34
Q

what is a kernel

A

–> part of the OS critical to correct
operation (trusted software)

35
Q

how does a kernel work?

A

–> Implements the basic mechanisms that
assure secure operation of the entire OS

–> Executes in supervisor mode

–> The trap instruction is used to switch from
user to supervisor mode, entering the OS

36
Q

what is a trap table

A

–> a reference table
–> user program will get permission from the kernel and indicate which trap instruction is needed to execute

37
Q

what are routines

A

In order to execute privileged instructions,
user programs have to activate routines in
the kernel, which can then execute on the
user programs’ behalf.

38
Q

what are 2 techniques to request services from os

A

system call
message passing

39
Q

what is a system call

A

–> In a system call, the relevant function is activated via a
trap instruction.

–> OS provides a stub function which the user program
calls

–> Stub function will switch the processor to the supervisor
mode

–> It will execute the trap instruction by branching to a
trap table to the entry point of the system function to be
invoked

–> On completion, processor is switched back to user
mode and control returns to user process

–> Appears as ordinary function call to the application
programmer

40
Q

what is message passing

A

–> In the message passing method, the user program
constructs a message that requests the desired
service.

–> Uses OS send() system call

–> OS kernel implements target function

–> Kernel process must be started or active i.e. must be in
supervisor mode, to receive message

–> User process waits for result with receive()
operation

–> Kernel sends message back to user process on
completion

41
Q

In system call, the user process/thread gains
ability to execute ____________

A

privileged instructions

42
Q

In the message-passing method, the system function is executed by the ________

A

kernel process/thread

43
Q

why are System calls more efficient than message
passing.

A

–> Message passing has cost of message
formation/copying and process multiplexing

–> System calls just requires a trap command.

44
Q

Most modern systems use _________

A

system calls

45
Q

what is a modular os architecture

A

implements each manager in its own software module

Interaction among various managers via abstract data
type

46
Q

what is monolithic kernel implementation

A

Four basic modules are combined into a single software module

47
Q

what is the Microkernel approach

A

–> Employs a small kernel that implements only the essential and critical functions

–> Reminder functions are implemented outside the kernel, possibly in separate modules

48
Q

disadvantage of modular os

A

Frequent calls incur performance penalty

Sacrifice modularity for performance

49
Q

why I/O and memory instructions are privileged instructions.

A

The OS is solely responsible for managing the memory and IO devices.

User programs can only execute non-priveleged instructions. Thus, having I/O and memory instructions privileged ensures that user programs cannot directly manipulate the memory or the devices.

50
Q

Suggest some reasons why UNIX is a monolithic kernel.

A

In the early days of computing, it is much more efficient to lump the code for the various managers together.

Combining the code does not require abstractions between the managers, thus reducing unnecessary code.

The various managers’ tasks require a high level of interaction among them. Coupling them into a single code enables that interaction to be done efficiently.

51
Q

what is resource abstraction

A

hides the actual tasks needed to use the computer resources to use the computer resources by providing simpler commands for user programs

52
Q

What are some of the factors that differentiate between the time to do a normal procedure call from an application program to one of its own procedures, compared to the time it takes to perform a system call to an OS procedure?

A

–> In normal procedure call, the ‘jump’ from the main program to the procedure is within the user space. The processor need NOT change mode. Thus, it is simpler and takes a shorter time.

–> A system call requires the processor to change mode. The processort also has to ‘jump’ from the user program to the relevant trap function. The trap table needs to be consulted to find the correct trap function to execute. All these functions involve more operations, hence is more complex and takes a longer time.

53
Q

windows NT is a ________

A

microkernel implementation