I wonder which was the first operating system that had context switch and what are famous examples of OS that didn't have context switch?
The first operating system to implement context switches as we understand them today was the Atlas supervisor. Quoting T. Kilburn, R. B. Payne and D. J. Howarth’s 1961 paper on The Atlas Supervisor (printed in AFIPS Computer Conference 20 and in Per Brinch Hansen’s Classic Operating Systems):
While one program is halted, awaiting completion of a magnetic tape transfer for instance, the co-ordinator routine switches control to the next program in the object program list which is free to proceed. In order to maintain full protection, it is necessary to preserve and recove the contents of working registers common to all programs such as the B-lines, accumulator, and control registers, and to protect blocks in use in core store.
The idea itself was first described by Christopher Strachey in his 1959 paper, Time sharing in large, fast computers; the main purpose was to allow computers to switch tasks when one task was blocked waiting on I/O. Interactive task-switching followed shortly; the first demonstration of that was CTSS in 1962 (this is what ended up being known as time-sharing; Strachey’s concept is referred to as multi-programming). In fact John McCarthy floated the idea of time-sharing in an unpublished memo dated January 1, 1959, so both concepts were contemporaneous.
Strictly speaking any operating system which supports hardware interrupts has to support some form of context switching, even if it is strictly single-tasking (like MS-DOS). So the only operating systems which didn’t have any form of context switching were the few batch processing operating systems in the late ’50s such as BKS on the Philco-2000.